import React from 'react'
import ReactDOM from 'react-dom'

var title = '菜鸟教程';
var MyTitle = React.createClass({
    propTypes:{
        title: React.PropTypes.string.isRequired
    },
    render: function () {
        return(
            <h1>{this.props.title}</h1>
        )
    }
})

ReactDOM.render(
    <MyTitle title={title}/>,
    document.getElementById('app')
)